/********************************************************/
/*	Author:		gong_libin			*/
/*	Date:		2017_11_01			*/
/*	File:		CmDspEng.h			*/
/********************************************************/

#ifndef	_CMDSPENG_H
#define	_CMDSPENG_H

#include "CmTcp.h"
#include "CmPool.h"
#include "CmUtil.h"
#include "CmEpoll.h"
#include "CmProJsn.h"
#include <signal.h>

#define	CM_DSP_POOL			8

#define	CM_DSP_POST			const_cast<char*>("POST")
#define	CM_DSP_RNRN			const_cast<char*>("\r\n\r\n")
#define	CM_DSP_LENG			const_cast<char*>("Content-Length: ")
#define	CM_DSP_HTTP			const_cast<char*>("HTTP/1.0 200 OK\r\nContent-Length: %ld\r\nContent-Type: application/json;charset=utf-8\r\n\r\n%s")

typedef struct tagCmDspPara
{
	int	m_iSocket;
	int	m_iLength;
	UCHAR	m_uszPacket[CM_KBYTES8];
}CMDSPPARA_S;

int CmDspEngEpollCore(int iSocket);
void* CmDspEngPoolCore(void* pPara);
void CmDspEngRealTimeBid(int iSocket, char* pszBody);

#endif /* _CMDSPENG_H */
